#!/usr/bin/env python

import os
import sys

# -------------------------------------

class CreateProjectCommand(object):
	description = ''

	def __init__(self):
		pass

	def usage(self):
		exit(1)

	def execute(self, options):
		if len(options) < 1:
			self.usage()

		name = options[0]

# -------------------------------------

commands = {
	'create_project': CreateProjectCommand
}

# -------------------------------------

def error(message):
	sys.stderr.write(message + '\n')

def exit(code):
	sys.exit(code)

def usage():
	error('usage: %s <command> [options]\n' % (os.path.basename(sys.argv[0])))
	error('\tcommands:');

	for command_name in commands.keys():
		command = commands[command_name]()

		error('\t\t%s - %s' % (command_name, command.description))

	exit(1)

def main():
	if len(sys.argv) < 2:
		usage()

	command_name = sys.argv[1].strip()

	if not commands.has_key(command_name):
		usage()

	command = commands[command_name]()

	command.execute(sys.argv[2:])

if __name__ == '__main__':
	main()
